<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use common\components\widgets\Datetimepicker;
Datetimepicker::widget(['timepicker' => 'true','format'=>'Y-m-d H:i']);
?>
<div class="yx-praise-box zx-min-height">
    <div class="yx-praise-list-box yx-praise-list-box1 yx-add-content-box">
        <?php $form = ActiveForm::begin(['enableClientValidation' => false, 'enableAjaxValidation' => true, 'options' => ['class' => 'form-validate']]); ?>
        <table width="100%" class="table-form">
            <tr>
                <th class="zx-goods-table"><?= $model->attributeLabels()['name']; ?></th>
                <td><?= $form->field($model, 'name', ['template' => '{input}{error}{hint}'])->textInput([ 'class' => 'input-text']) ?></td>
            </tr>
            <tr>
                <th class="zx-goods-table"><?= $model->attributeLabels()['type']; ?></th>
                <td style="display: inline-block;"><?= $form->field($model, 'type', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>[1=>'益智',2=>'音乐',3=>'形体'],'options' => ['placeholder' => '请选择']]) ?></td>
            </tr>
            <tr>
                <th class="zx-goods-table"><?= $model->attributeLabels()['money']; ?></th>
                <td><?= $form->field($model, 'money', ['template' => '{input}{error}{hint}'])->textInput([ 'class' => 'input-text']) ?></td>
            </tr>
            <tr>
                <th class="zx-goods-table"><?= $model->attributeLabels()['give_money']; ?></th>
                <td><?= $form->field($model, 'give_money', ['template' => '{input}{error}{hint}'])->textInput([ 'class' => 'input-text']) ?></td>
            </tr>
            <tr>
                <th class="zx-goods-table"><?= $model->attributeLabels()['start_time']; ?></th>
                <td><?= $form->field($model, 'start_time', ['template' => '{input}{error}{hint}'])->textInput([ 'class' => 'datetimepicker input-text']) ?></td>
            </tr>
            <tr>
                <th class="zx-goods-table"><?= $model->attributeLabels()['end_time']; ?></th>
                <td><?= $form->field($model, 'end_time', ['template' => '{input}{error}{hint}'])->textInput([ 'class' => 'datetimepicker input-text']) ?></td>
            </tr>
            <tr>
                <th class="zx-goods-table"><?= $model->attributeLabels()['number']; ?></th>
                <td><?= $form->field($model, 'number', ['template' => '{input}{error}{hint}'])->textInput([ 'class' => 'input-text']) ?></td>
            </tr>
            <tr>
                <th class="zx-goods-table"><?= $model->attributeLabels()['status']; ?></th>
                <td style="display: inline-block;"><?= $form->field($model, 'status', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>[1=>'启用',2=>'禁用'],'options' => ['placeholder' => '请选择']]) ?></td>
            </tr>
        </table>
        <div class="yx-submit-box" style="padding-left:270px;">
            <?= Html::submitButton('提交', ['class' => "button yx-submit", 'id' => 'button']) ?>
        </div>
        <?php ActiveForm::end(); ?>
    </div>
</div>
